<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>Document</title>
	<style>
		div {
			width: 300px;
			height: 200px;
			line-height: 200px;
			font-size: 100px;
			text-align: center;
			background-color: #000;
			color: #fff;
			display: none;
		}

		div:target { 			/* target指向hash值,一开始就显示div1了 */	/*注意：是div不是a*/ 
			display: block;
		}
	</style>
</head>
<body>
	<a href="#div1">div1</a>
	<a href="#div2">div2</a>
	<a href="#div3">div3</a>
	<div id="div1">div1</div>
	<div id="div2">div2</div>
	<div id="div3">div3</div>
</body>
</html>